package com.htl.exampro.question.pojo.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 答题vo
 * </p>
 *
 * @author hehehe
 * @since 2025-05-25
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "AnswerVO对象", description = "答题表")
public class AnswerVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 答题ID
     */
    @Schema(description = "答题ID")
    @JsonProperty("answerId")
    private Long answerId;

    /**
     * 考生用户ID
     */
    @Schema(description = "考生用户ID")
    @JsonProperty("userId")
    private String userId;

    /**
     * 关联试题ID
     */
    @NotBlank
    @Schema(description = "关联试题ID")
    @JsonProperty("questionId")
    private String questionId;

    /**
     * 考试ID
     */
    @Schema(description = "考试ID")
    @JsonProperty("examId")
    private String examId;

    /**
     * 试卷ID
     */
    @Schema(description = "试卷ID")
    @JsonProperty("paperId")
    private String paperId;

    /**
     * 课程ID
     */
    @Schema(description = "课程ID")
    @JsonProperty("courseId")
    private String courseId;

    /**
     * 考生答案
     */
    @Schema(description = "考生答案")
    @JsonProperty("answer")
    private String answer;

    /**
     * 得分
     */
    @Schema(description = "得分")
    @JsonProperty("score")
    private Integer score;

    /**
     * 总分
     */
    @Schema(description = "总分")
    @JsonProperty("fullScore")
    private Integer fullScore;

    /**
     * 是否正确 0-错误 1-正确
     */
    @Schema(description = "是否正确 0-错误 1-正确")
    @JsonProperty("isCorrect")
    private Byte isCorrect;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID")
    @JsonProperty("createdPerson")
    private String createdPerson;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @JsonProperty("createdTime")
    private LocalDateTime createdTime;

    /**
     * 修改人ID
     */
    @Schema(description = "修改人ID")
    @JsonProperty("updatedPerson")
    private String updatedPerson;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    @JsonProperty("updatedTime")
    private LocalDateTime updatedTime;
}
